package com.lh.process.engine.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author: linghao
 * @since: 2022/10/23
 */
public class ProcessorUtil {
    //TODO  参数需要配置化
    private static ExecutorService DEFAULT_POOL = new ThreadPoolExecutor(0, Integer.MAX_VALUE,
            60, TimeUnit.MICROSECONDS, new SynchronousQueue<>());

    public static void excuteAsync(Runnable runnable){
        DEFAULT_POOL.execute(runnable);
    }
}
